set(LV_DEMO_DIR ../managed_components/lvgl__lvgl/demos)
file(GLOB_RECURSE LV_DEMOS_SOURCES ${LV_DEMO_DIR}/*.c)

# set(UI_PRINTER_DIR ./ui_printer)
# file(GLOB_RECURSE UI_PRINTER_SOURCES ${UI_PRINTER_DIR}/*.c)

# set(UI_TUNER_DIR ./ui_tuner)
# file(GLOB_RECURSE UI_TUNER_SOURCES ${UI_TUNER_DIR}/*.c)

# ui_smarthome
set(UI_SMARTHOME_DIR ./ui_smarthome)
file(GLOB_RECURSE UI_SMARTHOME_SOURCES 
    ${UI_SMARTHOME_DIR}/*.c 
    ${UI_SMARTHOME_DIR}/guider_customer_fonts/*.c 
    ${UI_SMARTHOME_DIR}/guider_fonts/*.c 
    ${UI_SMARTHOME_DIR}/images/*.c
    ${UI_SMARTHOME_DIR}/custom/*.c)

# src
set(SRC_DIR ./src)
file(GLOB_RECURSE SRC_SOURCES ${SRC_DIR}/*.c)

# idf_component_register(
#     SRCS "main.c" ${SRC_SOURCES} ${LV_DEMOS_SOURCES} ${UI_PRINTER_SOURCES} ${UI_TUNER_SOURCES} ${UI_SMARTHOME_SOURCES}
#     INCLUDE_DIRS "." ${LV_DEMO_DIR} ${UI_PRINTER_DIR}/include ${UI_TUNER_DIR}/include 
#     ${UI_SMARTHOME_DIR} ${UI_SMARTHOME_DIR}/guider_customer_fonts ${UI_SMARTHOME_DIR}/guider_fonts 
#     ${UI_SMARTHOME_DIR}/images ${UI_SMARTHOME_DIR}/custom
#     ${SRC_DIR})
idf_component_register(
    SRCS "main.c" ${SRC_SOURCES} ${LV_DEMOS_SOURCES} ${UI_SMARTHOME_SOURCES}
    INCLUDE_DIRS "." ${LV_DEMO_DIR} 
    ${UI_SMARTHOME_DIR} ${UI_SMARTHOME_DIR}/guider_customer_fonts ${UI_SMARTHOME_DIR}/guider_fonts 
    ${UI_SMARTHOME_DIR}/images ${UI_SMARTHOME_DIR}/custom
    ${SRC_DIR})

target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-variable -Wno-format -DLV_LVGL_H_INCLUDE_SIMPLE)
